<%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2021/4/1
  Time: 16:39
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>用户管理页</title>
</head>
<body>
    <table border="1" width="700px">
        <thead>
            <tr>
                <th>ID</th>
                <th>姓名</th>
                <th>性别</th>
                <th>年龄</th>
                <th>邮箱</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <c:forEach items="${userList}" var="user">
                <tr>
                    <td>${user.id}</td>
                    <td>${user.name}</td>
                    <td>${user.gender.getDesc()}</td>
                    <td>${user.age}</td>
                    <td>${user.email}</td>
                    <td>
                        <a href="${pageContext.request.contextPath}/edit?id=${user.id}">编辑</a>
                        <a href="${pageContext.request.contextPath}/del?id=${user.id}">删除</a>
                    </td>
                </tr>
            </c:forEach>
            <tr style="text-align: right"><td colspan="6"><a href="${pageContext.request.contextPath}/add">添加用户</a></td></tr>
        </tbody>
    </table>
</body>
</html>
